@import '@/app/styles/variables';

.card {
  display: flex;
  flex-direction: column;
  width: 100%;
  cursor: default;
  overflow: hidden;
}

.course {
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
  max-width: 100%;

  &:hover {
    .title {
      color: #337cec;
    }

    .image img {
      transform: scale(1.1);
    }
  }
}

.badge {
  position: absolute;
  bottom: 12px;
  right: 12px;
}

.image {
  overflow: hidden;
  border-radius: 24px;
  border: 0;
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  flex-shrink: 0;
  background: #f3f3f3;
  isolation: isolate;

  img {
    border: 0;
    border-radius: inherit;
    transition: 0.1s ease-in all;
    object-position: center center;
    object-fit: cover;
  }
}

.title {
  color: #000;
  font-size: 20px;
  font-weight: 400;
  line-height: 26px;
  overflow: hidden;
  margin-top: 12px;
  margin-bottom: 4px;
  word-break: break-word;
  transition: 0.1s ease-in all;

  //text-overflow: ellipsis;
  //display: -moz-box;
  //-moz-box-orient: vertical;
  //display: -webkit-box;
  //-webkit-line-clamp: 3;
  //-webkit-box-orient: vertical;
  //line-clamp: 3;
}

.title_loader {
  height: 26px;
  width: 100%;
  max-width: 212px;
  border-radius: 8px;
  margin: 12px 0;
  background: #f3f3f3;
}

.tag {
  z-index: 1;
  position: absolute;
  top: 12px;
  right: 12px;
}

.discount {
  color: #ec3333;
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: 22px;
}

.price {
  display: flex;
  align-items: center;
  margin-top: 12px;
  gap: 12px;
}

.price_loader {
  width: 92px;
  height: 36px;
  display: flex;
  padding: 5px 24px;
  justify-content: center;
  align-items: center;
  gap: 6px;
  border: 0;
  border-radius: 100px;
  background: #f3f3f3;
}

.price_actual {
  display: flex;
  padding: 5px 24px;
  justify-content: center;
  align-items: center;
  gap: 6px;
  border: 0;
  border-radius: 100px;
  background: #f3f3f3;
  color: #337cec;
  cursor: pointer;
  font-size: 20px;
  font-style: normal;
  font-weight: 500;
  line-height: 26px;

  &:hover {
    color: #ffffff;
    background: #337cec;
  }
}

.price_old {
  color: #ababab;
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: 22px;
  text-decoration-line: line-through;
}

@include media(lg) {
  .tag {
    top: 10px;
    right: 10px;
  }
}

@include media(sm) {
  .title {
    font-size: 18px;
    line-height: 24px;
  }

  .price_old {
    font-size: 14px;
    line-height: 20px;
  }

  .price_actual {
    padding: 4px 20px;
    font-size: 18px;
    line-height: 24px;
  }

  .discount {
    font-size: 14px;
    line-height: 20px;
  }

  .badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
  }
}

@include media(xs) {
  .title {
    margin-top: 8px;
    font-size: 14px;
    line-height: 20px;
    margin-bottom: 2px;
  }

  .image {
    border-radius: 16px;
  }

  .description {
    font-size: 14px;
    line-height: 20px;
  }

  .tag {
    top: 8px;
    right: 8px;
  }

  .price {
    margin-top: 8px;
    gap: 8px;
  }

  .title_loader {
    width: 112px;
    height: 12px;
  }

  .price_loader {
    width: 56px;
    height: 24px;
    padding: 2px 8px;
    justify-content: center;
    align-items: center;
    gap: 6px;
  }

  .price_actual {
    height: 24px;
    padding: 2px 16px;
    font-size: 16px;
    line-height: 22px;
  }

  .price_old {
    font-size: 12px;
    line-height: 16px;
  }

  .discount {
    font-size: 12px;
    line-height: 16px;
  }
}
